#region Copyright Notice
// 
// 
// Copyright (c) 2009-2010 Anindya Chatterjee
// 
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// 
//     http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// 
// 
// 
#endregion
using System;
using System.Collections.Generic;
using System.Xml.Serialization;

namespace GCore
{
    /// <summary>
    /// The base Google Service feed entry class. Every Google Service feed entry must inherits this class.
    /// </summary>
    /// <remarks>
    /// You must add the [XmlRoot("entry", Namespace = "http://www.w3.org/2005/Atom")] attribute at top of each
    /// service feed entry class extending GEntry class.
    /// </remarks>
    [XmlRoot("entry", Namespace = "http://www.w3.org/2005/Atom")]
    public class GEntry : GObject
    {
        /// <summary>
        /// Gets and sets the Etag for the entry.
        /// </summary>
        [XmlAttribute("etag", Namespace = "http://schemas.google.com/g/2005")]
        public string Etag { get; set; }

        /// <summary>
        /// Gets and sets the id of the entry.
        /// </summary>
        [XmlElement("id", Namespace = "http://www.w3.org/2005/Atom")]
        public string IdString { get; set; }

        /// <summary>
        /// Gets and sets publish date of the entry.
        /// </summary>
        [XmlElement("published", Namespace = "http://www.w3.org/2005/Atom")]
        public DateTime Published { get; set; }

        /// <summary>
        /// Gets and sets the last update date of the entry.
        /// </summary>
        [XmlElement("updated", Namespace = "http://www.w3.org/2005/Atom")]
        public DateTime Updated { get; set; }

        /// <summary>
        /// Gets and sets title of the entry.
        /// </summary>
        [XmlElement("title", Namespace = "http://www.w3.org/2005/Atom")]
        public string Title { get; set; }

        /// <summary>Gets and sets the content of the entry.</summary>
        [XmlElement("content", Namespace = "http://www.w3.org/2005/Atom")]
        public Content Content { get; set; }

        /// <summary>Gets and sets the list of links associated with the entry.</summary>
        [XmlElement("link", Namespace = "http://www.w3.org/2005/Atom")]
        public List<Link> Links { get; set; }

        /// <summary>
        /// Gets and sets the author of the entry.
        /// </summary>
        [XmlElement("author", Namespace = "http://www.w3.org/2005/Atom")]
        public Author Author { get; set; }
    }
}